import React from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'
import PropTypes from "prop-types";

/*
@name: BottomBtn
@description: 按钮组件
@author: ChangHao
@time: 2020-11-09 10:34:32
*/
const BottomBtn = ({onBtnClick, icon, colorClass, text, className}) => {
    return (
        <button className={`btn  w-100 no-border btn-${colorClass} ${className}
        `} onClick={() => onBtnClick()}>
            <FontAwesomeIcon icon={icon}/>
            <span>{text}</span>
        </button>
    )
}
BottomBtn.propTypes = {
    onBtnClick:PropTypes.func,
    colorClass:PropTypes.string,
    text:PropTypes.string,
    className:PropTypes.string,
}
BottomBtn.defaultProps = {
    text:"新建",
    colorClass:"primary",
}
export default BottomBtn;